import { FC } from "react";
import { useNavigate } from "react-router-dom";
import { useTitle } from "ahooks";
import { Button, Typography } from "antd";
import styles from "./index.module.scss";
import { MANAGE_LIST_PATHNAME } from "../../router";

const { Title, Paragraph } = Typography;

const Home: FC = () => {
  useTitle("小可问卷");

  const nav = useNavigate();

  return (
    <div className={styles.container}>
      <div className={styles.info}>
        <Title>问卷调查 | 在线投票</Title>
        <Paragraph>已累计创建问卷 100 份， 收到答卷 980 份</Paragraph>
        <div>
          <Button
            type="primary"
            size="large"
            onClick={() => nav(MANAGE_LIST_PATHNAME)}
          >
            开始使用
          </Button>
        </div>
      </div>
    </div>
  );
};

export default Home;
